﻿using LY.Entity;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace LY.DataAccess.Repository
{
    public class T_RepaymentPlanRespository:BaseRepository
    {
        public T_RepaymentPlan GetModel(int id)
        {
            string sql = @"select [ID],[RepaymentPlanNO],[RepaymentPlanDate],[CurrentPrincipal],[RemainingPrincipal],[Status]
                            ,[ProjectID] from T_RepaymentPlan where Id=@Id";
            return base.Get<T_RepaymentPlan>(sql, new {Id = id});
        }

        public T_RepaymentPlan GetModelByRepaymentPlanNo(string repaymentPlanNo)
        {
            string sql = @"select [ID],[RepaymentPlanNO],[RepaymentPlanDate],[CurrentPrincipal],[RemainingPrincipal],[Status]
                            ,[ProjectID] from T_RepaymentPlan where RepaymentPlanNO=@RepaymentPlanNO";
            return base.Get<T_RepaymentPlan>(sql, new {RepaymentPlanNO = repaymentPlanNo});
        }
    }
}
